package code.google.jcontainer.test.inject;

import code.google.jcontainer.support.inject.Inject;
import code.google.jcontainer.test.simple.SimpleBean;

/**
 * @author <a href="mailto:jfox.young@gmail.com">Young Yang</a>
 * @create 2009-12-27 16:15:48
 */
@SimpleBean(name = "ComponentA")
public class ComponentA {

    @Inject(constantKey = "constant_1")
    private String constant1;

    @Inject(constantKey = "constant_2")
    private int constant2;

    @Inject(name = "ComponentB")
    private ComponentB componentB;

    private ComponentB componentB2;

    public String getConstant1() {
        return constant1;
    }

    public int getConstant2() {
        return constant2;
    }

    public ComponentB getComponentB() {
        return componentB;
    }

    @Inject
    public void setComponentB2(ComponentB componentB2){
        this.componentB2 = componentB2;
    }

    public ComponentB getComponentB2(){
        return componentB2;
    }
}
